-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support prepared statement placeholder arg ?
and $
#420
Conversation
Pull Request Test Coverage Report for Build 1827316036Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks (again) for the contribution @gamife
@@ -59,6 +59,8 @@ pub enum Value { | |||
}, | |||
/// `NULL` value | |||
Null, | |||
/// `?` or `$` Prepared statement arg placeholder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with the $
syntax for prepared argument placeholders. What database system do they come from?
I have only ever seen ?
used for prepared statement placeholders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example from pgsql's document.
PREPARE fooplan (int, text, bool, numeric) AS
INSERT INTO foo VALUES($1, $2, $3, $4);
EXECUTE fooplan(1, 'Hunter Valley', 't', 200.00);
However, only numbers follow the $.
Then I found that there was a need for $foo in the issue. #145 (comment)
So the final product is this:
SELECT * FROM student WHERE id = $Id1;
Maybe there can't be a separate $placeholder here.
Thank you even more for your continued contribution. I'm just a spoon of water in the ocean :-)
?
?
?
?
?
and $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks @gamife
Co-authored-by: gamife <[email protected]>
Co-authored-by: gamife <[email protected]>
#145 support
?
or$foo
prepared statement arg placeholder.